//
//  String+Emoji.swift
//  EmojiKeyBoard
//
//  Created by macs on 15/11/20.
//  Copyright © 2015年 BlackTail. All rights reserved.
//

import Foundation

extension String {

    var emojiString : String {
        //扫描器
       let scanner = NSScanner(string: self)
        //
        var value : UInt32 = 0
        scanner.scanHexInt(&value)
        //将16进制转为字符串
        let char = Character(UnicodeScalar(value))
        //返回表情字符
       return "\(char)"
    }
    
}